
<%@ page import="com.edusite.Logbook" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="mainAdmin" />
        <g:set var="entityName" value="${message(code: 'logbook.label', default: 'Logbook')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/home/indice')}">Home</a></span>
           
        </div>
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                            <g:sortableColumn property="id" title="${message(code: 'logbook.id.label', default: 'Id')}" />
                        
                            <th><g:message code="logbook.person.label" default="Person" /></th>
                   	    
                            <g:sortableColumn property="entrada" title="${message(code: 'logbook.entrada.label', default: 'Entrada')}" />
                        
                            <g:sortableColumn property="salida" title="${message(code: 'logbook.salida.label', default: 'Salida')}" />
                            <th><g:message code="logbook.tarea.label" default="Tarea" /></th>
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${logbookInstanceList}" status="i" var="logbookInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td>${fieldValue(bean: logbookInstance, field: "id")}</td>
                        
                            <td>${fieldValue(bean: logbookInstance, field: "person")}</td>
                        
                            <td><g:formatDate date="${logbookInstance.entrada}" /></td>
                        
                            <td><g:formatDate date="${logbookInstance.salida}" /></td>
                           <td>${fieldValue(bean: logbookInstance, field: "tarea")}</td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${logbookInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
